package com.spsoft.vatoutinv.model.vo.matchflow;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 发票匹配流水-查看已匹配记录
 *
 * @author : chenxudong
 * @date : 2024/6/28 9:17
 */
@Data
@ApiModel(value = "发票匹配流水-查看已匹配记录对象")
public class VmsMatchRecordVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID")
    private Long matid;

    /**
     * 发票代码
     */
    @ApiModelProperty(value = "发票代码")
    private String fpdm;

    /**
     * 发票号码
     */
    @ApiModelProperty(value = "发票号码")
    private String fphm;

    /**
     * 发票总金额
     */
    @ApiModelProperty(value = "发票总金额")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal fpje;

    /**
     * 发票总税额
     */
    @ApiModelProperty(value = "发票总税额")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal fpse;

    /**
     * 流水总金额
     */
    @ApiModelProperty(value = "流水总金额")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal lsje;

    /**
     * 流水总税额
     */
    @ApiModelProperty(value = "流水总税额")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal lsse;

    /**
     * 金额差异 实时计算
     */
    @ApiModelProperty(value = "金额差异")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal jecy;

    /**
     * 税额差异 实时计算
     */
    @ApiModelProperty(value = "税额差异")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal secy;

    /**
     * 允许差异金额
     */
    @ApiModelProperty(value = "允许差异金额")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal yxcyje;

    /**
     * 差异金额说明
     */
    @ApiModelProperty(value = "差异金额说明")
    private String cyjesm;

    /**
     * 流程申请说明
     */
    @ApiModelProperty(value = "流程申请说明")
    private String remark;

    /**
     * 开票单位
     */
    @ApiModelProperty(value = "开票单位")
    private String kpdw;

    /**
     * 老系统发票主信息id
     */
    @ApiModelProperty(hidden = true)
    private Long oidid;

    /**
     * 发票匹配流水-查看已匹配记录明细
     */
    @ApiModelProperty(value = "发票匹配流水-查看已匹配记录明细")
    private List<VmsMatchItemRecordVo> matchItemRecordList;

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel(value = "发票匹配流水-查看已匹配记录明细对象")
    public static class VmsMatchItemRecordVo extends VmsMatchInvoiceItemVo {

        /**
         * 流水总金额 实时计算
         */
        @ApiModelProperty(value = "流水总金额")
        @JsonSerialize(using = ToStringSerializer.class)
        private BigDecimal lszje;

        /**
         * 流水总税额 实时计算
         */
        @ApiModelProperty(value = "流水总税额")
        @JsonSerialize(using = ToStringSerializer.class)
        private BigDecimal lszse;

        /**
         * 金额差异 实时计算
         */
        @ApiModelProperty(value = "金额差异")
        @JsonSerialize(using = ToStringSerializer.class)
        private BigDecimal jecy;

        /**
         * 税额差异 实时计算
         */
        @ApiModelProperty(value = "税额差异")
        @JsonSerialize(using = ToStringSerializer.class)
        private BigDecimal secy;
    }

}
